﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ILookintoForm
{
    public partial class Form1 : Form
    {
        MainMenu MyMenu; 
        public Form1()
        {
            InitializeComponent();
            Text = "Adding a Main Menu";

            // Create a main menu object. 
            MyMenu = new MainMenu();

            // Add top-level menu items to the menu. 
            MenuItem m1 = new MenuItem("File");
            MyMenu.MenuItems.Add(m1);

            MenuItem m2 = new MenuItem("Tools");
            MyMenu.MenuItems.Add(m2);

            // Create File submenu 
            MenuItem subm1 = new MenuItem("Open");
            m1.MenuItems.Add(subm1);

            MenuItem subm2 = new MenuItem("Close");
            m1.MenuItems.Add(subm2);

            MenuItem subm3 = new MenuItem("Exit");
            m1.MenuItems.Add(subm3);

           

            //MyMenu;
 
    

        }

        private void userControl11_Load(object sender, EventArgs e)
        {

        }

        private void File_Click(object sender, EventArgs e)
        {
            
        }
    }
}
